<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title>后台</title>
		<link rel="stylesheet" href="/static/admin/css/dashicons.css">
		<link rel="stylesheet" href="/static/admin/css/style.css">
		<script src="/static/admin/js/jquery.2.1.4.min.js"></script>
	</head>
	<body>
		<div class="wrap wrap-article">
			<h1>回收站</h1>
			<div class="tips"></div>
			<div class="box">
				<div class="box-body">
					<table>
						<tr>
						<th width="80">状态</th>
						<th>文章标题</th>
						<th width="120">所属栏目</th>
						<th width="100">作者</th>
						<th width="150">创建时间</th>
						<th width="150">操作</th>
						</tr>
						{volist name="list" id="v"}
						<tr>
							<td class="s-show"><i class="icon-wait">已删除</i></td>
							<td class="s-title"><a href="../show.php?id=6" target="_blank">{$v.title}</a></td>
							<td><a href="?cid=6">[ PHP ]</a></td>
							<td>{$v.user.username}</td>
							<td>{$v.create_time}</td>
							<td class="s-act">
							<a href="javascript:void(0)" onclick="restore({$v.id})" class="jq-del">还原</a></td>
						</tr>
						{/volist}
					</table>
				</div>
			</div>
<!--			<div class="pagelist"><span>首页</span><span>上一页</span><aa href="?page=1" class="curr">1</aa><aa href="?page=2">2</aa><aa href="?page=2">下一页</aa><aa href="?page=2">尾页</aa></div>-->

			<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
				  integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
			{$list|raw}

		</div>
	</body>
</html>
<script>
	function restore(id){
		$.ajax({
			url:'restore',
			type:'POST',
			data:{
				id:id,
			},
			success:function (res){
				if(res.code==1){
					// alert(res.msg);
					setTimeout(()=>{
						window.location='http://www.tp6cms.com/index.php/index/index/recycle';
					},100);
				}else{
					alert(res.msg);
				}
			}
		});
	}
</script>